#include "TcpConnection.h"
#include "TcpServer.h"
#include "Threadpool.h"
#include "Configuration.h"
#include "HomeServer.h"
#include <cstdlib>
#include <iostream>
using namespace std;

int main()
{
    Configuration *_pInstance = Configuration::getinstance();
    map<string, string> figure = _pInstance->get();
    cout << figure["port"] << figure["ip"] << figure["thread_num"] << figure["task_num"] << endl;
    HomeServer server(
        atoi(figure["port"].c_str()),
        figure["ip"].c_str(),
        atoi(figure["thread_num"].c_str()),
        atoi(figure["task_num"].c_str()));

    server.start();
    return 0;
}